import time

from app.modules.apps.container_tomcat import TomcatMultiWarApp, TomcatApp, TomcatScApp
from app.modules.common import network

tomcat = TomcatScApp(app_id='gzidc:sc',
                     zone_home_path='/usr/local/app/uc.gzidc.area',
                     zone_alias='gzidc',
                     port='180')
tomcat.stop()
tomcat.uninstall_app()
tomcat.install_app()
tomcat.restart()
print tomcat.is_started()

time.sleep(3)
print tomcat.is_started()
time.sleep(3)
#tomcat.stop()
print tomcat.is_started()
